# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-pytest-reraise
#_pkgreal is used by apkbuild-pypi to find modules at PyPI
_pkgreal=pytest-reraise
pkgver=2.1.2
pkgrel=0
pkgdesc="Make multi-threaded pytest test cases fail when they should"
url="https://pypi.python.org/project/pytest-reraise"
arch="noarch"
license="MIT"
depends="py3-pytest"
checkdepends="py3-pytest"
makedepends="py3-setuptools py3-gpep517 py3-wheel poetry"
source="$pkgname-$pkgver.tar.gz::https://github.com/bjoluc/pytest-reraise/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"
subpackages="$pkgname-pyc"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -v
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
0095a3fd9672349a8d6628f11ac57369d48e1fdc20722215a8713ee396af563d0c95947592b5578da251b590087e479d6597bd403d1e6c2e38de4208a6db04a9  py3-pytest-reraise-2.1.2.tar.gz
"
